set hive.exec.dynamic.partition=true;            --  动态分区
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.max.dynamic.partitions=90;         --  每天生成 60 个分区
set hive.exec.max.dynamic.partitions.pernode=90; --  每天生成 60 个分区

insert overwrite table jms_dim.dim_ep_flow_direction_base
select
 id               s
 ,agent_code
 ,agent_name
 ,center_code
 ,center_name
 ,place_type_code
 ,place_type_name
 ,line_code
 ,line_name
 ,scan_type
 ,line_type
 ,direction_code
 ,direction_name
 ,direction_info
 ,institution_code
 ,institution_name
 ,assert_start
 ,assert_end
 ,remark
 ,create_by
 ,create_by_name
 ,create_time
 ,modify_by
 ,modify_by_name
 ,modify_time
 ,is_second_code
from jms_ods.ep_flow_direction
where dt= '{{ execution_date | cst_ds }}'
distribute by 1 ;